refactored the bin/rake and bin/rails files