More API related functions and stuff