Fixing code style
Adding tests with rspec