Removed stray code and order entries by id