Refactoring

* PEP8 fixes
* More pythonic style
* Use of context manager
* Added readfile() method with GZipped file support (WIP)