use log.Fatal when calling http.ListenAndServe
change handler function names, fix decoder