Made local init function.