Basic reference interpreter implementation