test layer fixes, model fixes and some attachment tests