added debounced resize, rendering done css class and whitespace removing