Added variable initializations in init function