Code cleanup and implementation for Elmah.