Clean up code and fix order not getting decorated