Updated logging.
Implemented manual reordering.