Polish 'event' process
Refactor angular.js logics