Commented some println and added better log messages and JavaDocs