Added 501 support.
Minor updates.