Added some functionality
Massive cleanup and refactor