Misc restructure and breakage of tests