Updated and Refactored
Done