Remove unused imports
Remove redundant backslash escapes
Make the complex model assertion less monolithic