Static local variables

Converted to using Javascripts method of doing them.