Refactor order model
Add test for generate order options