Preparatory commits for "universal door"

These changes are needed to support the universal door.
Reviewers: @josh-ripple @mtrippled 
The `-> error_code` signifies a trailing return and tells you what the function returns. In *this* case, it returns an `error_code`. I don't see a point of a trailing return here, frankly.