Use 501 for unimplemented methods or timestamps.

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

- Fix other minor errors.