Added onInit() method to entities