remove unused, possibly buggy method
fix formatting, add javadoc
code cleanup (variable naming, use enumeration.toString() for
comparison)