Renamed methods and made them more reusable.
Use EnumSet rather than HashSet.
More detailed logging of controller info.
Javadoc.