Implement more api functions, part 1