Started cleaning up code

Started cleaning up code