Improved website window resizing, cleaned up code