resize stuff
And more refactor stuff