refactor config loader, and new code for orders
refactor config loader, and new code for orders