initial environment points to a valid struct instead of null, eliminates null checks
add comments for update steps