Improved Code, Refactored class and cleaned mess