Initial commit
Refactored and made pep8 compliant