fix some bugs introduced by nojs support and clean up class names