Backups and other fixes

Added backup functions and fixed some issues