Implement working page resize logic
Debounce resize and refactor