Use 501 for unimplemented methods and timestamps.

- Use 501 whenever the feature is actually not implemented.
  A method-based routing function is added for this.

- Fix other minor errors.