Refactoring of inject, correcting mistakes in Takeaway, fixed rspec issue