Helpers refactoring

http://mrccodereview.cloudapp.net/ui#review:id=1271