Added an interactive menu and abstracted things