Temporary remove spring because it made problem when run rake task (we can't know anymore if it a rake task or the application that is running with the $0).
Refactor methods to use smarter ruby function.
Add unit test for this refactoring