#6 First cut at adding status codes.

This is WIP. Not really sure what is going
to turn out to be the cleanest.