fix some bugs
remove unused files