Move scales only to file it's needed in
Fix string writing