Refactor www/js/app/src/entities/ files

Sorted functions in alphabetical order