cleaning up code

was messy