added comments, general code cleanup

fixed maven warnings