Added temporary functionalty to view and remove patient modules fro main menu. also cleaned up small memory leaks that were occuring due to misplaced free commands.