All done, just needs comments
Removed debug code
Small clean up