Miscellaneous utilities for AngularJS