handle_attach in model, OrdersController cleanup
some refactoring