Minor changes. There are some bugs to be fixed.