diff --git a/doc/files/cd b/doc/files/cd
index e7a7e7eea68c511f17ff7528f8eb90853a2aa2f0..e1b63bbf403b42c86b84bcbc932e604130c4dc98 100644
--- a/doc/files/cd
+++ b/doc/files/cd
@@ -8,5 +8,8 @@ DESCRIPTION
 	Change the current directory for the whole LPC process, return
 	1 for success, 0 otherwise.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/getcwd
\ No newline at end of file
diff --git a/doc/files/file b/doc/files/file
index 251a6202c989f89f2a34420fb44a7274417a16c3..53fc4eb76d178ba4d3bd75b132f4616307f34835 100644
--- a/doc/files/file
+++ b/doc/files/file
@@ -38,12 +38,12 @@ DESCRIPTION
 	Open a file for read write or append. The variable how should
 	contain one or more of the following letters:
 
-		'r'	: open file for reading
-		'w'	: open file for writing
-		'a'	: open file for append (use with 'w')
-		't'	: truncate file at close (use with 'w')
-		'c'	: create file if it doesn't exist (use with 'w')
-		'x'	: fail if file already exist (use with 'c')
+	'r'	open file for reading
+	'w'	open file for writing
+	'a'	open file for append (use with 'w')
+	't'	truncate file at close (use with 'w')
+	'c'	create file if it doesn't exist (use with 'w')
+	'x'	fail if file already exist (use with 'c')
 
 	How should _always_ contain at least one of 'r' or 'w'.
 
@@ -171,17 +171,17 @@ DESCRIPTION
 	transfer speed when it does.
 
 SEE ALSO
-	files/socket, port/accept
-
+	file->open_socket, port->accept
 
 ============================================================================
 NAME
 	set_nonblocking - make stream nonblocking
 
 SYNTAX
-	void file->set_nonblocking(function read_callback,
-			           function write_callback,
-			           function close_callback);
+	void file->set_nonblocking(
+	       function read_callback,
+	       function write_callback,
+	       function close_callback);
 
 DESCRIPTION
 	This function sets a stream to nonblocking mode. When data arrives on
@@ -305,7 +305,7 @@ DESCRIPTION
 	the argument a reference to the same file, it creates a new file
 	with the same properties and places it in the argument.
 
-EXAMPLE	
+EXAMPLE
 	/* Redirect stdin to come from the file 'foo' */
 	object o;
 	o=clone((program)"/precompiled/file");
diff --git a/doc/files/file_stat b/doc/files/file_stat
index c911ac13547c680147c849b175e57872bf78c4f8..8cccd143ad2809bfcc90bb29dddf6a8af77920a8 100644
--- a/doc/files/file_stat
+++ b/doc/files/file_stat
@@ -10,24 +10,26 @@ SYNTAX
 
 DESCRIPTION
 	file_stat returns an array of integers describing some properties
-	about the file.	Currently file_stat return 5 entries:
+	about the file. Currently file_stat return 7 entries:
 	({
-	   mode, /* file mode, protection bits etc. etc. */
-	   size, /* file size for regular files,
-	          * -2 for dirs,
-	          * -3 for links,
-	          * -4 for otherwise
-	          */
-	   atime, /* last access time */
-	   mtime, /* last modify time */
-	   ctime, /* last status time change */
-	   uid,   /* The user who owns this file */
-	   gid   /* The group this file belongs to */
+	   mode,	/* file mode, protection bits etc. etc. */
+	   size,	/* file size for regular files,
+	   	           -2 for dirs,
+	   	           -3 for links,
+	   	           -4 for otherwise */
+	   atime,	/* last access time */
+	   mtime,	/* last modify time */
+	   ctime,	/* last status time change */
+	   uid,  	/* The user who owns this file */
+	   gid   	/* The group this file belongs to */
 	})
 	If you give 1 as a second argument, stat does not follow links.
 	You can never get -3 as size if you don't give a second argument.
 
 	If there is no such file or directory, zero is returned.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/get_dir
diff --git a/doc/files/get_dir b/doc/files/get_dir
index c344114abdaca69ae3d782ef3af3b9c3e820aa35..aa7aa6df8751f7509d406095ff7414ab906ef1e0 100644
--- a/doc/files/get_dir
+++ b/doc/files/get_dir
@@ -8,5 +8,8 @@ DESCRIPTION
 	Return an array of all filenames in the directory dir, or zero if
 	no such directory exists.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/mkdir, files/cd
diff --git a/doc/files/getcwd b/doc/files/getcwd
index d3c010ec8e4929060208342cdd7990e8c27b9b3b..7d6ec4b385f78373b721084b97f6fe49dbc90181 100644
--- a/doc/files/getcwd
+++ b/doc/files/getcwd
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	getcwd returns the current working directory.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/cd
diff --git a/doc/files/mkdir b/doc/files/mkdir
index 780d8ed25367362b33e646bbc407130f00ce4aa3..49c9ae7596fa486d1ac353ee05d2235c3e96fc96 100644
--- a/doc/files/mkdir
+++ b/doc/files/mkdir
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Create a directory, return zero if it fails and nonzero if it fails.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/rm, files/cd
diff --git a/doc/files/mv b/doc/files/mv
index c76ea4cb8664d60a9ffcb97f4602ed25f807a232..679710b2414dbeab5c13d843c87a988efb981821 100644
--- a/doc/files/mv
+++ b/doc/files/mv
@@ -9,5 +9,8 @@ DESCRIPTION
 	file already exists, it will be overwritten. Returns 1 on sucess,
 	0 otherwise.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/rm
diff --git a/doc/files/port b/doc/files/port
index fa3c67fab7dcb8e7e7abc805cdbe38128135ea72..92ebfd2b6802112963112ed19412f3cb8b5b81b3 100644
--- a/doc/files/port
+++ b/doc/files/port
@@ -133,6 +133,6 @@ DESCRIPTION
 	/precompiled/file. The new file is by default set to blocking.
 
 SEE ALSO
-	file
+	/precompiled/file
 
 ============================================================================
diff --git a/doc/files/rm b/doc/files/rm
index fdfbef9ff514b32d92cb73c5a5fa19354cc63248..a7a86fef89bfb6cbf74dbe5ce79e2cd87a6123be 100644
--- a/doc/files/rm
+++ b/doc/files/rm
@@ -7,6 +7,8 @@ SYNTAX
 DESCRIPTION
 	Remove a file or directory, return 0 if it fails. Nonzero otherwise.
 
+KEYWORDS
+	file
+
 SEE ALSO
 	files/mkdir
-	
\ No newline at end of file
diff --git a/doc/math/acos b/doc/math/acos
index 0c2f758e37eed0eb852dca3eb78fe985b778713f..bd3ca9225b7bc12782929da738d808e4eec0e02e 100644
--- a/doc/math/acos
+++ b/doc/math/acos
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return the arcus cosinus value for f.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/cos, math/asin
diff --git a/doc/math/asin b/doc/math/asin
index c71c06156a1aafb7bee1df2bbe7a81cb1d0b0314..af772d5b39c685e3da8865670bdc64ef6dcd96a2 100644
--- a/doc/math/asin
+++ b/doc/math/asin
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return the arcus sinus value for f.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/sin, math/acos
diff --git a/doc/math/atan b/doc/math/atan
index 64092f422daabcc30f6a5fbd3cbc0d2dbe6fdb06..d6ebcb70024e44b1d7bb75e4b70402d847521733 100644
--- a/doc/math/atan
+++ b/doc/math/atan
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return the arcus tangent value for f.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/tan, math/asin, math/acos
diff --git a/doc/math/ceil b/doc/math/ceil
index c560d878d0181f0bcf4c0f9f3acb93a2b73716f2..5017676469df91f94a4a536994c95b9a94c4b114 100644
--- a/doc/math/ceil
+++ b/doc/math/ceil
@@ -8,5 +8,8 @@ DESCRIPTION
 	Return the closest integral value higher or equal to x.
 	Note that ceil() does _not_ return an int, merely an integral value.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/floor
diff --git a/doc/math/cos b/doc/math/cos
index e8d953663962e8ac9b249525fab902d745a3f930..921c46ded29b6d22c7350a9db7a0b226c1328d24 100644
--- a/doc/math/cos
+++ b/doc/math/cos
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return the cosinus value for f.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/acos, math/sin
diff --git a/doc/math/exp b/doc/math/exp
index 45698f298fb4004c0fec10a9323096184a5a2487..13963c29ded662987e43c01cc50bd78110df1764 100644
--- a/doc/math/exp
+++ b/doc/math/exp
@@ -8,5 +8,8 @@ DESCRIPTION
 	Return the natural exponent of f.
 	log( exp( x ) ) == x as long as exp(x) doesn't overflow an int.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/pow, math/log
diff --git a/doc/math/floor b/doc/math/floor
index 3dc6cd8826d1e4939e7c8611f545a16bdf8059b8..b257489c99eeb8f3e4717f3094d36c4b0315bdab 100644
--- a/doc/math/floor
+++ b/doc/math/floor
@@ -8,5 +8,8 @@ DESCRIPTION
 	Return the closest integral value lower or equal to x.
 	Note that floor() does _not_ return an int, merely an integral value.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/ceil
diff --git a/doc/math/log b/doc/math/log
index 80dee7c7f95f6b8906794d8239fed626ed4fe99c..e58c48f6731e555a61a8df85d37bf33b46bf91b2 100644
--- a/doc/math/log
+++ b/doc/math/log
@@ -8,5 +8,8 @@ DESCRIPTION
 	Return the natural logarithm of f.
 	exp( log(x) ) == x for x > 0.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/pow, math/exp
diff --git a/doc/math/pow b/doc/math/pow
index ad87a22ad45c8c1e8149299b9cc51ccc6188e029..8bc39e252fc4fcd8f84b902c6ff9e210a9b49a85 100644
--- a/doc/math/pow
+++ b/doc/math/pow
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return n raised to the power of x.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/exp, math/log
diff --git a/doc/math/sin b/doc/math/sin
index 8944254e81b4f8b8a02d0d9925eefdffad1c04a8..e3d6ae96bf825cf81b5209b05c2e113ac65a9c80 100644
--- a/doc/math/sin
+++ b/doc/math/sin
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return the sinus value for f.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/asin, math/cos
diff --git a/doc/math/sqrt b/doc/math/sqrt
index 6bfa0d678437d05d03a7169bd7f0b098f9d9fa7a..c84faca6dce851a6d9e1e99f72c1328287de8e07 100644
--- a/doc/math/sqrt
+++ b/doc/math/sqrt
@@ -10,5 +10,8 @@ DESCRIPTION
 	Return the square root of f, or in the second case, the square root
 	truncated to the closest lower integer.
 
+KEYWORDS
+	float, int
+
 SEE ALSO
 	math/pow, math/log, math/exp, math/floor
diff --git a/doc/math/tan b/doc/math/tan
index f78b014e4f0afcdb9f91abe602547ba54986e745..0672360e6f0ab4d63d42e2459976552a1a03846b 100644
--- a/doc/math/tan
+++ b/doc/math/tan
@@ -7,5 +7,8 @@ SYNTAX
 DESCRIPTION
 	Return the tangent value for f.
 
+KEYWORDS
+	float
+
 SEE ALSO
 	math/atan, math/sin, math/cos
diff --git a/doc/regexp/regexp b/doc/regexp/regexp
index a9c0faf9412ac241a4bababa2edcc5dcd4effe8d..f2c5b0638998bc308cb9ee8b353ee5b19b64a702 100644
--- a/doc/regexp/regexp
+++ b/doc/regexp/regexp
@@ -6,18 +6,18 @@ DESCRIPTION
 	regexp package written in C. It contains a few simple functions to
 	handle regexps. A short description of regexp follows:
 
-	.      Matches any character
-	[abc]  Matches a, b or c
-	[a-z]  Matches any character a to z inclusive
-	[^ac]  Matches any character except a and c
-	(x)    Matches x (x might be any regexp)
-	x*     Matches zero or more occurances of 'x' (x may be anything)
-	x|y    Matches x or y. (x or y may be any regexp)
-	xy     Matches xy (x and y may be any regexp)
-	^      Matches beginning of string (but no characters)
-	$      Matches end of string (but no characters)
-	<x>    Used with split() to put the string matching x into the
-	       result array.
+	.	Matches any character
+	[abc]	Matches a, b or c
+	[a-z]	Matches any character a to z inclusive
+	[^ac]	Matches any character except a and c
+	(x)	Matches x (x might be any regexp)
+	x*	Matches zero or more occurances of 'x' (x may be anything)
+	x|y	Matches x or y. (x or y may be any regexp)
+	xy	Matches xy (x and y may be any regexp)
+	^	Matches beginning of string (but no characters)
+	$	Matches end of string (but no characters)
+	<x>	Used with split() to put the string matching x into the
+		result array.
 
 	Note that \ can be used to quote these characters in which case
 	they match themselves, nothing else. Also note that when quoting
@@ -27,7 +27,7 @@ DESCRIPTION
 	For more information about regexps, refer to your unix manuals such
 	as sed or ed.
 
-	Descriptions of all functions in /precompiled/file follows:
+	Descriptions of all functions in /precompiled/regexp follows:
 
 ============================================================================
 NAME
diff --git a/doc/sprintf/sprintf b/doc/sprintf/sprintf
index 87312b54b3e4bb8ce04245d7845c09d17db940c9..65b26021dc10d50451a948bd3cd431b6b8a5ebeb 100644
--- a/doc/sprintf/sprintf
+++ b/doc/sprintf/sprintf
@@ -174,5 +174,8 @@ EXAMPLES
 	> quit
 	Exiting.
 
+KEYWORDS
+	string
+
 SEE ALSO
 	sscanf