Improving code quality and added a few tests
Improved code and added some tests
Uncommented imports