Organized functions to reflect the header file.