changed a uint in code to int, improved tabbing, added ids to temp variable names