Bug fixes, started working on file management routines