Refactor sp.rake