Added debounce, finished resize function.