tidying up and removing singleton usage
Add RSpec and some basic tests