refactored RegisterHandler to work with http.mux instances again