CLEANUP: remove warnings, add javadocs