File load/save, other fixes