move APIs to dedicated files
add some docs