Refactor.
Fix scaling.