clean up code with partials