It works now.

Update desgin and code style, add some functions.