Collection of javascript helper functions / patterns