508 fixes. Bug fixes.
Refactor so price validation is testable. Add tests for price validation.