Refactored whole code
Transformations not fully functional