[fixes] tests and moved reorder_item to separate module