Migrating Shreyas\'s code into the main_controller. Added step definitions for scenarios