Refactor load/save pattern/instruments functions