Refactored Code. Added functionality to make simple function graph plots for real-valued functions