Removing code from the rake task to integrate class

Remove logic from rake task and added to Integrate class