Add rake tasks for diagnostics and some convenience methods.