Revert "files, state, optimizations"

This reverts commit a40f015bd4309eb46a28e915e4c04d45fa1c8c55.