Random fixes and almost finished javadocs.