Added javadocs and public classes

Separated classes into different files to allow public use