Fixed some findbugs issues, minor renaming and improved javadoc