Reorganize functions for the new syntax