Add RSpec and reorganize the code structure to allow for creation of new algorithms