Collection of helper functions for JS