Cleaned up roilsqr() some (cut out variables that can be assigned in the function call)