Added some comments for javadoc, changed some things to make it look
like better