Refactored more code and added an interactive menu