Implementation of new model + tweaks to detection