Added multiple functionability to the main class.