Small utility methods for JS