Added new API documentation
Fixed bug which raised exceptions when ndb models were used.
Refactored code to a more efficient version
Added and refactored some unittests