Refactor, fix resize.