Documentation #48

Documentation and removed some bugs