Merged yd backend

Hi, guys! Please, approve anyone my request!
move class to controllers/models.rb