Further performance improvements

Added smarter updating
Added a time threshold for orders
Added order deletion