Change APIs and add some comments

Ready for router