Limit data input and reduced scope of some variables.