removes global leak
adds correct layout prioritization
test for less errors
adds fix for catching jade errors