Move files and fix some bugs