grouped methods by type, added more javadoc