code and HTML cleanup