DISCL-235: Code review Friday refactorings

This is preliminary draft review
Fixed, checking output height of sws_scale