Rspec fun

Cleaning and adding tests.