Refactored the code base
Cleaned up the documentation