add cucumber and features, refactor rspec code for use as unit tests