adding more API docs, refactored some interfaces