Move onInit to top of constructor