Add comments and JavaDoc