Finished more api functions. Began working on unittesting api