refactoring apllication_helper for better js-calls