remove unnecessary masks. clean up javadocs.