Some code quality improvements

- add docstrings to all public objects
- fix docstring conventions (comply with PEP8, PEP257)
- widely add __future__ import absolute_import