Fixes various thing, and remove un-needeed files.