Code Cleaned and Refactored

Initial commit

Code cleaning