Bug fixes, and added regular saving