update to 1.0d4

diff --git a/NEWS b/NEWS
index 0486439..1f3c773 100644
--- a/NEWS
+++ b/NEWS
@@ -1 +1 @@
-1.0d3
+1.0d4
diff --git a/README b/README
index bad4c45..4462563 100644
--- a/README
+++ b/README
@@ -1,3 +1,490 @@
-mod_tcl for Apache 2.0
+mod_tcl 1.0 Developer Documentation
+-----------------------------------
 
-Please see www.fractal.net for documentation.
+This documentation referes to mod_tcl 1.0d4.
+Please see tcl.apache.org and www.fractal.net for more information.
+
+BUGS
+----
+
+Tcl_Hook_Post_Read_Request
+Tcl_Hook_Translate_Name
+
+do not currently function because Apache crashes after they are DECLINEd
+
+
+Configuration Directives
+------------------------
+
+Determine if the module should be active
+@param 1 On or Off
+Tcl
+
+Set an array variable or a scalar variable
+@param 1 Array variable if param 3 is non-null, otherwise a scalar variable
+@param 2 Name of an array element if param 3 is non-null, otherwise value to set scalar
+@param 3 Value to set array element to
+Tcl_Var
+
+Append to a list
+@param 1 List variable to append to
+@param 2 Value to append
+Tcl_ListVar
+
+Add a content handler to be executed
+@param 1 The name of a procedure that is to be called when a content handler is called
+Tcl_ContentHandler
+
+Add a post read request hook
+@param 1 The name of a procedure that is to be called when a read request hook is called
+Tcl_Hook_Post_Read_Request
+
+Add a translate name hook
+@param 1 The name of a procedure that is to be called when a translate name hook is called
+Tcl_Hook_Translate_Name
+
+Add a header parser hook
+@param 1 The name of a procedure that is to be called when a header parser hook is called
+Tcl_Hook_Header_Parser
+
+Add an access checker hook
+@param 1 The name of a procedure that is to be called when an access checker hook is called
+Tcl_Hook_Access_Checker
+
+Add a check user id hook
+@param 1 The name of a procedure that is to be called when a check user id hook is called
+Tcl_Hook_Check_User_ID
+
+Add an auth checker hook
+@param 1 The name of a procedure that is to be called when an auth checker hook is called
+Tcl_Hook_Auth_Checker
+
+Add a type checker hook
+@param 1 The name of a procedure that is to be called when a type checker hook is called
+Tcl_Hook_Type_Checker
+
+Add a fixups hook
+@param 1 The name of a procedure that is to be called when a fixups hook is called
+Tcl_Hook_Fixups
+
+Add a log transaction hook
+@param 1 The name of a procedure that is to be called when a log transaction hook is called
+Tcl_Hook_Log_Transaction
+
+Add raw TCL to the interpeter
+@param 1 A TCL script that will be executed in the interpreter
+<Tcl>
+
+End adding raw TCL to the interpreter
+</Tcl>
+
+Constants Provided
+------------------
+
+DECLINED
+DONE
+OK
+	
+M_POST
+M_GET
+M_PUT
+M_DELETE
+M_CONNECT
+M_OPTIONS
+M_TRACE
+M_PATCH
+M_PROPFIND
+M_PROPPATCH
+M_MKCOL
+M_COPY
+M_MOVE
+M_LOCK
+M_UNLOCK
+M_INVALID
+	
+HTTP_CONTINUE
+HTTP_SWITCHING_PROTOCOLS
+HTTP_PROCESSING
+HTTP_OK
+HTTP_CREATED
+HTTP_ACCEPTED
+HTTP_NON_AUTHORITATIVE
+HTTP_NO_CONTENT
+HTTP_RESET_CONTENT
+HTTP_PARTIAL_CONTENT
+HTTP_MULTI_STATUS
+HTTP_MULTIPLE_CHOICES
+HTTP_MOVED_PERMANENTLY
+HTTP_MOVED_TEMPORARILY
+HTTP_SEE_OTHER
+HTTP_NOT_MODIFIED
+HTTP_USE_PROXY
+HTTP_TEMPORARY_REDIRECT
+HTTP_BAD_REQUEST
+HTTP_UNAUTHORIZED
+HTTP_PAYMENT_REQUIRED
+HTTP_FORBIDDEN
+HTTP_NOT_FOUND
+HTTP_METHOD_NOT_ALLOWED
+HTTP_NOT_ACCEPTABLE
+HTTP_PROXY_AUTHENTICATION_REQUIRED
+HTTP_REQUEST_TIME_OUT
+HTTP_CONFLICT
+HTTP_GONE
+HTTP_LENGTH_REQUIRED
+HTTP_PRECONDITION_FAILED
+HTTP_REQUEST_ENTITY_TOO_LARGE
+HTTP_REQUEST_URI_TOO_LARGE
+HTTP_UNSUPPORTED_MEDIA_TYPE
+HTTP_RANGE_NOT_SATISFIABLE
+HTTP_EXPECTATION_FAILED
+HTTP_UNPROCESSABLE_ENTITY
+HTTP_LOCKED
+HTTP_FAILED_DEPENDENCY
+HTTP_INTERNAL_SERVER_ERROR
+HTTP_NOT_IMPLEMENTED
+HTTP_BAD_GATEWAY
+HTTP_SERVICE_UNAVAILABLE
+HTTP_GATEWAY_TIME_OUT
+HTTP_VERSION_NOT_SUPPORTED
+HTTP_VARIANT_ALSO_VARIES
+HTTP_INSUFFICIENT_STORAGE
+HTTP_NOT_EXTENDED
+	
+REMOTE_HOST
+REMOTE_NAME
+REMOTE_NOLOOKUP
+REMOTE_DOUBLE_REV
+	
+APLOG_EMERG
+APLOG_ALERT
+APLOG_CRIT
+APLOG_ERR
+APLOG_WARNING
+APLOG_NOTICE
+APLOG_INFO
+APLOG_DEBUG
+APLOG_NOERRNO
+
+REQUEST_NO_BODY
+REQUEST_CHUNKED_ERROR
+REQUEST_CHUNKED_DECHUNK
+
+Commands
+--------
+
+Abort request
+@param 1 A string with the reason of abortion
+@deffunc abort 1
+abort
+
+Read posted data and set the array pram
+@deffunc read_post
+read_post
+
+Generate a random integer
+@return An integer
+@deffunc random
+random
+
+Seed random number generation
+@param 1 An integer to seed random number generation
+@deffunc srandom 1
+srandom
+
+Encode data to base64
+@param 1 Data to be encoded
+@return Base64 string of converted data
+@deffunc base64_encode 1
+base64_encode
+
+Decode data from base64
+@param 1 Base64 string to be converted to data
+@return Data that was converted from base64
+@deffunc base64_decode
+base64_decode
+
+Call ap_allow_options
+@return An integer with the mask of options
+@deffunc ap_allow_options
+ap_allow_options
+
+Call ap_allow_overrides
+@return An integer
+@deffunc ap_allow_overrides
+ap_allow_overrides
+
+Call ap_default_type
+@return A string
+@deffunc ap_default_type
+ap_default_type
+
+Call ap_document_root
+@return A string
+@deffunc ap_document_root
+ap_document_root
+
+Call ap_get_remote_host
+@param 1 An integer specifying the type of lookup
+@return A string
+@deffunc ap_get_remote_host 1
+ap_get_remote_host
+
+Call ap_get_remote_logname
+@return A string
+@deffunc ap_get_remote_logname
+ap_get_remote_logname
+
+Call ap_construct_url
+@param 1 A uri
+@return A string
+@deffunc ap_construct_url 1
+ap_construct_url
+
+Call ap_get_server_name
+@return A string
+@deffunc ap_get_server_name
+ap_get_server_name
+
+Call ap_get_limit_req_body
+@return An integer
+@deffunc ap_get_limit_req_body
+ap_get_limit_req_body
+
+Call ap_get_limit_xml_body
+@return An integer
+@deffunc ap_get_limit_xml_body
+ap_get_limit_xml_body
+
+Call ap_custom_response
+@param 1 An integer
+@param 2 A string
+@deffunc ap_custom_response 1 2
+ap_custom_response
+
+Call ap_exists_config_define
+@param 1 A string
+@return An integer
+@deffunc ap_exists_config_define 1
+ap_exists_config_define
+
+Call ap_auth_type
+@return A string
+@deffunc ap_auth_type
+ap_auth_type
+
+Call ap_auth_name
+@return A string
+@deffunc ap_auth_name
+ap_auth_name
+
+Call ap_satisfies
+@return An integer
+@deffunc ap_satisfies
+ap_satisfies
+
+Call ap_requires
+@return A list { {integer, string} ... }
+@deffunc ap_requires
+ap_requires
+
+Call ap_log_error
+@param 1 An integer specifying log level
+@param 2 An integer specifying the status
+@param 3 A string specifying the error
+@deffunc ap_log_error 1 2 3
+ap_log_error
+
+Call ap_send_http_header
+@deffunc ap_send_http_header
+ap_send_http_header
+
+Call ap_send_http_trace
+@return An integer
+@deffunc ap_send_http_trace
+ap_send_http_trace
+
+Call ap_send_http_options
+@return An integer
+@deffunc ap_send_http_options
+ap_send_http_options
+
+Call ap_finalize_request_protocol
+@deffunc ap_finalize_request_protocol
+ap_finalize_request_protocol
+
+Call ap_send_error_response
+@param 1 An integer with recursion level
+@deffunc ap_send_error_response
+ap_send_error_response
+
+Call ap_set_content_length
+@param 1 An integer specifying length
+@deffunc ap_set_content_length 1
+ap_set_content_length
+
+Call ap_set_keepalive
+@return An integer
+@deffunc ap_set_keepalive
+ap_set_keepalive
+
+Call ap_rationalize_mtime
+@param 1 An integer specifying mtime
+@return An integer
+@deffunc ap_rationalize_mtime 1
+ap_rationalize_mtime
+
+Call ap_make_etag
+@param 1 An integer specifying force_weak
+@return A string
+@deffunc ap_make_etag 1
+ap_make_etag
+
+Call ap_set_etag
+@deffunc ap_set_etag
+ap_set_etag
+
+Call ap_set_last_modified
+@deffunc ap_set_last_modified
+ap_set_last_modified
+
+Call ap_meets_conditions
+@return An integer
+@deffunc ap_meets_conditions
+ap_meets_conditions
+
+Call ap_rputs
+@param 1 Either -nonewline or a string to write
+@param 2 if param 1 is -nonewline then a string to write
+@deffunc ap_rputs 1 2
+ap_rputs
+
+Call ap_rwrite
+@param 1 Data to write
+@deffunc ap_rwrite 1
+ap_rwrite
+
+Call ap_rflush
+@deffunc ap_rflush
+ap_rflush
+
+Call ap_get_status_line
+@param 1 An integer specifying status
+@return A string
+@deffunc ap_get_status_line 1
+ap_get_status_line
+
+Call ap_setup_client_block
+@param 1 An integer specifying read policy
+@return An integer
+@deffunc ap_setup_client_block 1
+ap_setup_client_block
+
+Call ap_get_client_block, sets variable R with data
+@param 1 An integer specifying the number of bytes to read
+@return An integer specifying the actual number of bytes read
+@deffunc ap_get_client_block 1
+ap_get_client_block
+
+Call ap_discard_request_body
+@return An integer
+@deffunc ap_discard_request_body
+ap_discard_request_body
+
+Call ap_note_auth_failure
+@deffunc ap_note_auth_failure
+ap_note_auth_failure
+
+Call ap_note_basic_auth_failure
+@deffunc ap_note_basic_auth_failure
+ap_note_basic_auth_failure
+
+Call ap_note_digest_auth_failure
+@deffunc ap_note_digest_auth_failure
+ap_note_digest_auth_failure
+
+Call ap_get_basic_auth_pw, sets R with password
+@return An integer
+@deffunc ap_get_basic_auth_pw
+ap_get_basic_auth_pw
+
+Call ap_parse_uri
+@param 1 A string specifying a uri
+@deffunc ap_parse_uri 1
+ap_parse_uri
+
+Call ap_method_number_of
+@param 1 A string with a method name
+@return An integer specifying the method number
+@deffunc ap_method_number_of 1
+ap_method_number_of
+
+Call ap_method_name_of
+@param 1 An integer specifying a method number
+@return A string specifying a method name
+@deffunc ap_method_name_of 1
+ap_method_name_of
+
+Call ap_internal_redirect
+@param 1 A string specifying a uri to redirect to
+@deffunc ap_internal_redirect 1
+ap_internal_redirect
+
+Call ap_internal_redirect_handler
+@param 1 A string specifying a uri to redirect to
+@deffunc ap_internal_redirect_handler 1
+ap_internal_redirect_handler
+
+Call ap_some_auth_required
+@return An integer
+@deffunc ap_some_auth_required
+ap_some_auth_required
+
+Call ap_update_mtime
+@param 1 An integer specifying a dependancy
+@deffunc ap_update_mtime 1
+ap_update_mtime
+
+Call ap_allow_methods
+@param 1 An integer specifying a reset
+@param 2 A string specifying methods
+@deffunc ap_allow_methods 1 2
+ap_allow_methods
+
+Call ap_get_server_version
+@return A string
+@deffunc ap_get_server_version
+ap_get_server_version
+
+Call ap_add_version_component
+@param 1 A string specifying a version component to add
+@deffunc ap_add_version_component 1
+ap_add_version_component
+
+Call ap_get_server_built
+@return A string
+@deffunc ap_get_server_built
+ap_get_server_built
+
+Call ap_create_environment, sets array env
+@deffunc ap_create_environment
+ap_create_environment
+
+Reads variables from request_rec structure
+@param 1 variable or "connection" or "server"
+@param 2 if param 1 "connection" or "server" then a variable to read
+@return The variable read, could be an integer, string, or list
+@deffunc r 1 2
+r
+
+Sets variables in request_rec structure
+@param 1 variable or "connection" or "server"
+@param 2 if param 1 "connection" or "server" then variable
+@param x variable list of data to be written
+@deffunc r_set 1 2 ...
+r_set
+
+Ouput text/html
+@param 1 A script of text to output
+@deffunc output 1
+output
diff --git a/tcl_core.c b/tcl_core.c
index 03d509a..a3809e7 100644
--- a/tcl_core.c
+++ b/tcl_core.c
@@ -74,8 +74,6 @@
 /* 8  */ static int tcl_fixups(request_rec *r);
 /* 9  */ static int tcl_log_transaction(request_rec *r);
 
-/* 10 */ static int tcl_http_method(const request_rec *r);
-
 static const char* add_hand(cmd_parms *parms, void *mconfig, const char *arg);
 static const char* sfl(cmd_parms *parms, void *mconfig, int flag);
 static const char* tcl_set(cmd_parms *parms, void *mconfig, const char *one, const char *two, const char *three);
@@ -85,13 +83,17 @@
 
 typedef const char* (*fz_t)(void);
 
-#define NUM_HANDLERS 11
+#define NUM_HANDLERS 10
 
 static const command_rec tcl_commands[] = {
 	AP_INIT_FLAG(		"Tcl",							(fz_t) sfl,				(void*) 1,	OR_AUTHCFG,		"turn mod_tcl on or off." ),
 	AP_INIT_TAKE23(		"Tcl_Var",						(fz_t) tcl_set,			NULL,		OR_AUTHCFG,		"set global variables in TCL." ),
 	AP_INIT_TAKE2(		"Tcl_ListVar",					(fz_t) tcl_setlist,		NULL,		OR_AUTHCFG,		"set global list variables." ),
-	AP_INIT_TAKE1(		"Tcl_ContentHandlers",			(fz_t) add_hand,		(void*) 0,	OR_AUTHCFG,		"add content handlers." ),
+	
+	/* this may be phased out, it should now be, Tcl_ContentHandler */
+	AP_INIT_TAKE1(		"Tcl_ContentHandlers",			(fz_t) add_hand,		(void*) 0,	OR_AUTHCFG,		"add content handler." ),
+	
+	AP_INIT_TAKE1(		"Tcl_ContentHandler",			(fz_t) add_hand,		(void*) 0,	OR_AUTHCFG,		"add content handlers." ),
 	AP_INIT_TAKE1(		"Tcl_Hook_Post_Read_Request",	(fz_t) add_hand,		(void*) 1,	OR_AUTHCFG,		"add post_read_request handlers." ),
 	AP_INIT_TAKE1(		"Tcl_Hook_Translate_Name",		(fz_t) add_hand,		(void*) 2,	OR_AUTHCFG,		"add translate_name handlers." ),
 	AP_INIT_TAKE1(		"Tcl_Hook_Header_Parser",		(fz_t) add_hand,		(void*) 3,	OR_AUTHCFG,		"add header_parser handlers." ),
@@ -101,7 +103,6 @@
 	AP_INIT_TAKE1(		"Tcl_Hook_Type_Checker",		(fz_t) add_hand,		(void*) 7,	OR_AUTHCFG,		"add type_checker handlers." ),
 	AP_INIT_TAKE1(		"Tcl_Hook_Fixups",				(fz_t) add_hand,		(void*) 8,	OR_AUTHCFG,		"add fixups handlers." ),
 	AP_INIT_TAKE1(		"Tcl_Hook_Log_Transaction",		(fz_t) add_hand,		(void*) 9,	OR_AUTHCFG,		"add log_transaction handlers." ),
-	AP_INIT_TAKE1(		"Tcl_Hook_HTTP_Method",			(fz_t) add_hand,		(void*) 10,	OR_AUTHCFG,		"add http_method handlers." ),
 	AP_INIT_RAW_ARGS(	"<Tcl>",						(fz_t) tcl_raw_args,	NULL,		OR_AUTHCFG,		"add raw tcl to the interpreter." ),
 	AP_INIT_NO_ARGS(	"</Tcl>",						(fz_t) tcl_no_args,		NULL,		OR_AUTHCFG,		"end of tcl section." ),
 	{ NULL }
@@ -116,9 +117,9 @@
 {
 	ap_hook_pre_config(tcl_init, NULL, NULL, AP_HOOK_REALLY_FIRST);
 	ap_hook_post_config(tcl_init_handler, NULL, NULL, AP_HOOK_MIDDLE);
-/*	
-	ap_hook_post_read_request(tcl_post_read_request, NULL, NULL, AP_HOOK_MIDDLE);
-	ap_hook_translate_name(tcl_translate_name, NULL, NULL, AP_HOOK_MIDDLE);
+	
+//	ap_hook_post_read_request(tcl_post_read_request, NULL, NULL, AP_HOOK_MIDDLE);
+//	ap_hook_translate_name(tcl_translate_name, NULL, NULL, AP_HOOK_MIDDLE);
 	ap_hook_header_parser(tcl_header_parser, NULL, NULL, AP_HOOK_MIDDLE);
 	ap_hook_access_checker(tcl_access_checker, NULL, NULL, AP_HOOK_MIDDLE);
 	ap_hook_check_user_id(tcl_check_user_id, NULL, NULL, AP_HOOK_MIDDLE);
@@ -126,11 +127,6 @@
 	ap_hook_type_checker(tcl_type_checker, NULL, NULL, AP_HOOK_MIDDLE);
 	ap_hook_fixups(tcl_fixups, NULL, NULL, AP_HOOK_MIDDLE);
 	ap_hook_log_transaction(tcl_log_transaction, NULL, NULL, AP_HOOK_MIDDLE);
-*/
-
-/*
-	ap_hook_http_method(tcl_http_method, NULL, NULL, AP_HOOK_MIDDLE);
-*/
 }
 
 AP_DECLARE_DATA module tcl_module = {
@@ -570,7 +566,7 @@
 
 static void tcl_init_handler(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 {
-	ap_add_version_component(pconf, "mod_tcl/1.0d3");
+	ap_add_version_component(pconf, "mod_tcl/1.0d4");
 }
 
 static int run_handler(request_rec *r, int hh)
@@ -797,9 +793,3 @@
 {
 	return run_handler(r, 9);
 }
-
-static int tcl_http_method(const request_rec *r)
-{
-	/* this isn't nice at all!!! */
-	return run_handler((request_rec*) r, 10);
-}