Refactored the code and Updated Menu