Added documentation
Moved main to separate file. Added setup
Relocate tests