Just steal the code. There is a helpful piece of code to outline anything that is NOT outlined, which also combines shapes together and makes shadows.