update doc and move App and Session to standalone files.