refactored loads of stuff, mostly around subitems