Better testing and rake task