Add guard against NullPointerException.
Renamed the link from "Edit" to "Rewrite".

Partially resolves issue #39.