Added documentation, missing methods, fixed bugs