Added docs and python3 compatibility