Add more validation to resource and demand models.
Add all pending RSpec tests.