clean up global variables
maintain experience value of user
fix memory error
avoid using global buffer
Merge branch 'dev-daemon'