Removed some variables, minor improvements.