Clean up uri patterns and use 413 status where appropriate.