Compare entry_id and url for finding latest entry

Cleaned up version of #153