added isset function
testing functions.
working on variable scope.
renamed files.
refactoring a huge chunk to make optimizing easier