Update JavaDocs and code formatting fixes