Code improvements

adjusted all scaling, added looping capability,
solve statements now run