refactor level data loading/saving