Remove errors that were used just for debugging while implementing
Fix parsing error when reading reference functions

The readPropertyPath() function already reads the next token, so it is not
necessary to do it again
Fix crash when ref'ing a nonexistent value
When using dot notation after a ref, evaluate it and apply on the object