Refactored some file and container methods. Added filename field.