Reworking file API
Cleanup
File API work