fixed bug caused by empty rows, refactored save methods, improved variable naming