Made all classes strict and fixed leaking variables, #1233