Fix the code to work with OpenNMS 1.12

Current required OpenNMS version is 1.12.6-SNAPSHOT
Formatting the code and adding basic JavaDocs.