Fixed bugs that prevented Main.lsl from compiling

There are two constants that are being used within Main.lsl that
must have been removed at one time. Thus the code in the repository
will not even compile. This (surprising) bug was fixed - but the
constants are replicated elsewhere, which needs to be changed.
Dont call a function everytime through a loop

The for loop called llGetListLength every time through the loop,
and it is not necessary. Get the length ahead of time and replace
the function call with a variable fetch: much faster.