lots of work on file loading and saving, now almost up to spec, still needs refactoring...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>