Added initialization, input/output etc