Some code cleanup and use symbolic html status codes.