First publishable commit. Finished refactoring. Added documentaion. #64