Ordering manager

Tests, ordering manager logic and support for hardware manager