Improved function interface.

Improved function interface and added some builtin commands like /help and /list.