Clean up code, tweak parts