Rewritten all base files and removed unnecessary files