Javadocs and a little refactor
Updated tests so they will compile due to changes in application