Refactoring; add file manager.