Final commit of week 1. Code cleanup + javadocs