clean up code and rename files