Worked on issue #6 and some other necessary functionalities.