Common init function in common controller