Removed unused model
SQL rewritten to ORM
changed url for AJAX duplicity control