Load/save functionality and other bugs fixes.