Remove legacy type classnames
Fix indent
Use qwery when appropriate