Move some stuff around and javadocs