Added basic support for files, added testing for agent.