This entire code should be inside the Railtie