fix some compiling errors and add some original files under the bin folder