Ported several functions for Molecule.js