Some fixes in file entity, and removed a lot of other overhead files