_removeClass function now also removes the leading space so portrait/landscape flipping won't make the html class tag longer each time.