Refactored end to end test
Added rakefile to run tests