cleanup and comment web mode fix