Adding javadoc comments, fixing some spacing/tab issues, and adding logging instead of system.out