some rewriting

extraSpace/Height isn't needed and looped some things, not sure if you like it of course