Cleaned up the resize window code. Now it's possible the fathom. Turns out I was doing some calculation that wasn't needed at all, making it even more obfuscated.