diff --git a/doc/builtin/getpid b/doc/builtin/getpid
new file mode 100644
index 0000000000000000000000000000000000000000..6510e175c8efc8f7ed1a88e44eedf682ccda61dd
--- /dev/null
+++ b/doc/builtin/getpid
@@ -0,0 +1,12 @@
+NAME
+	getpid - get the process id of this process
+
+SYNTAX
+	int getpid();
+
+DESCRIPTION
+	This returns the pid of this process. Useful for sending
+	signals to yourself.
+
+SEE ALSO
+	kill, fork, signal
diff --git a/doc/builtin/kill b/doc/builtin/kill
new file mode 100644
index 0000000000000000000000000000000000000000..ad0dc868a479ef4db91f89e4edd5547a76de9b72
--- /dev/null
+++ b/doc/builtin/kill
@@ -0,0 +1,47 @@
+NAME
+	kill - send signal to other process
+
+SYNTAX
+	int kill(int pid, int signal)
+
+DESCRIPTION
+	Kill sends a signal to another process. If something goes wrong
+	-1 is returned, 0 otherwise.
+
+	Some signals and their supposed purpose:
+
+	SIGHUP	Hangup, sent to process when user logs out
+	SIGINT	Interrupt, normally sent by ctrl-c
+	SIGQUIT	Quit, sent by ctrl-\
+	SIGILL	Illegal instruction
+	SIGTRAP	Trap, mostly used by debuggers
+	SIGABRT	Aborts process, can be caught, used by uLPC whenever something
+		goes seriously wrong.
+	SIGBUS	Bus error
+	SIGFPE	Floating point error (such as division by zero)
+	SIGKILL	Really kill a process, cannot be caught
+	SIGUSR1	Signal reserved for whatever you want to use it for.
+	SIGSEGV	Segmentation fault, caused by accessing memory where you
+		shouldn't. Should never happen to uLPC.
+	SIGUSR2	Signal reserved for whatever you want to use it for.
+	SIGALRM	Signal used for timer interrupts.
+	SIGTERM	Termination signal
+	SIGSTKFLT Stack fault
+	SIGCHLD	Child process died
+	SIGCONT	Continue suspended
+	SIGSTOP	Stop process
+	SIGSTP	Suspend process
+	SIGTTIN	tty input for background process
+	SIGTTOU	tty output for background process
+	SIGXCPU	Out of cpu
+	SIGXFSZ	File size limit exceeded
+	SIGPROF	Profile trap
+	SIGWINCH Window change signal
+	
+	Note that you have to use signame to translate the name of a signal
+	to it's number.
+
+SEE ALSO
+	signal, signum, signame, files/fork
+
+
diff --git a/doc/builtin/signal b/doc/builtin/signal
new file mode 100644
index 0000000000000000000000000000000000000000..eadd0008fc23ede12d2b8f4361461f6796bcfde3
--- /dev/null
+++ b/doc/builtin/signal
@@ -0,0 +1,23 @@
+NAME
+	signal - trap signals
+
+SYNTAX
+	void signal(int sig, function(int:void) callback);
+	or
+	void signal(int sig);
+
+DESCRIPTION
+	This function allows you to trap a signal and have a function called
+	when the process receives a signal. Although it IS possible to trap
+	SIGBUS, SIGSEGV etc. I advice you not to. uLPC should not receive any
+	such signals and if it does it is because of bugs in the uLPC
+	interperter. And all bugs should be reported, no matter how trifle.
+
+	The callback will receive the signal number as the only argument.
+	See the document for the function 'kill' for a list of signals.
+
+	If no second argument is given, the signal handler for that signal
+	is restored to the default handler.
+
+SEE ALSO
+	kill, signame, signum
diff --git a/doc/builtin/signame b/doc/builtin/signame
new file mode 100644
index 0000000000000000000000000000000000000000..8d6d4c7092b3b853e11818dd8f6114cc90bc0d74
--- /dev/null
+++ b/doc/builtin/signame
@@ -0,0 +1,15 @@
+NAME
+	signame - get the name of a signal
+
+SYNTAX
+	string signame(int sig);
+
+DESCRIPTION
+	Return a string describing the signal.
+
+EXAMPLE
+	> signame(9);
+	Result: SIGKILL
+
+SEE ALSO
+	kill, signum, signal
diff --git a/doc/builtin/signum b/doc/builtin/signum
new file mode 100644
index 0000000000000000000000000000000000000000..f0ab4b2bdd893b3adedcec9528ee2ff8562fdf70
--- /dev/null
+++ b/doc/builtin/signum
@@ -0,0 +1,15 @@
+NAME
+	signum - get a signal number given a desctiptive string
+
+SYNTAX
+	int signum(string sig);
+
+DESCRIPTION
+	This function is the opposite of signame.
+
+EXAMPLE
+	> signum("SIGKILL");
+	Result: 9
+
+SEE ALSO
+	signame, kill, signal
\ No newline at end of file
diff --git a/doc/builtin/sleep b/doc/builtin/sleep
new file mode 100644
index 0000000000000000000000000000000000000000..4a7a03a6ce80038716cd81e98b266945be451cc5
--- /dev/null
+++ b/doc/builtin/sleep
@@ -0,0 +1,13 @@
+NAME
+	sleep - let interpreter doze of for a while
+
+SYNTAX
+	void sleep(int s);
+
+DESCRIPTION
+	This function makes the program stop for s seconds. Only signal
+	handlers can interrupt the sleep. Other callbacks are not called
+	during sleep.
+
+SEE ALSO
+	signal
diff --git a/doc/files/file b/doc/files/file
index 09de4bab8b0045d3dd005e2fbf309c306f6275a7..d5b9361301c31c35e53d87b2d2f2cf9a76594f6d 100644
--- a/doc/files/file
+++ b/doc/files/file
@@ -353,8 +353,9 @@ SYNTAX
 
 DESCRIPTION
 	This funcion connects a socket previously created with
-	file->open_socket to a remote socket. The argument is the ip number
-	for the remote machine on the form x.x.x.x where x is a number.
+	file->open_socket to a remote socket. The argument is the ip name
+	or number fot he remote machine.
+
 	This function returns 1 for success, 0 otherwise. Note that if the
 	socket is in nonblocking mode, you have to wait for a write or close
 	callback before you know if the connection failed or not.
@@ -381,4 +382,19 @@ SEE ALSO
 	file->connect
 
 ============================================================================
+NAME
+	pipe - create a two-way pipe
 
+SYNTAX
+	object file->pipe();
+
+DESCRIPTION
+	This function creates a pipe between the object it was called in
+	and an object that is returned. The two ends of the pipe are
+	indistinguishable. If the object is this function is called in
+	was open to begin with, it is closed before the pipe is created.
+
+SEE ALSO
+	builtin/fork
+
+============================================================================
diff --git a/doc/files/port b/doc/files/port
index d219179047d6861f087798c54eee35b989723a1a..fa3c67fab7dcb8e7e7abc805cdbe38128135ea72 100644
--- a/doc/files/port
+++ b/doc/files/port
@@ -16,6 +16,8 @@ SYNTAX
 	int port->bind(int port);
 	or
 	int port->bind(int port,function accept_callback);
+	or
+	int port->bind(int port,function accept_callback, string ip);
 
 DESCRIPTION
 	Bind opens a sockets and binds it to port number on the local machine.
@@ -24,6 +26,9 @@ DESCRIPTION
 	the socket. The callback will receive the id for this port as argument.
 	Bind returns 1 on success, and zero on failiure.
 
+	If the optional argument 'ip' is given, bind will try to bind to
+	this ip name (or number).
+
 SEE ALSO
 	port->accept
 
@@ -56,9 +61,13 @@ SYNTAX
 	or
 	void port->create("stdin",function accept_callback)
 	or
+	void port->create("stdin",function accept_callback)
+	or
 	void port->create(int port)
 	or
 	void port->create(int port,function accept_callback)
+	or
+	void port->create(int port,function accept_callback, string ip)
 
 DESCRIPTION
 	When create is called with 'stdin' as argument, a socket is created
diff --git a/doc/lpc/control_structures b/doc/lpc/control_structures
index 713815f5a54e3e92c65455e1b9a254609027a8d2..ff95a39ba1ba1bd0c582abfa40b9999cfebf0d15 100755
--- a/doc/lpc/control_structures
+++ b/doc/lpc/control_structures
@@ -50,6 +50,22 @@ SEE ALSO
 
 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
+STATEMENT
+	foreach - loop over an array
+
+SYNOPSIS
+	foreach ( array, variable ) statement
+
+DESCRIPTION
+	For each element in array, set variable to that value and execute
+	'statement'.
+
+EXAMPLE
+	string word;
+	foreach( explode(sentence," "), word) foo(word);
+	
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
 STATEMENT
 	while - execute a statement while an expression is true
 
diff --git a/doc/lpc/hilfe.hilfe b/doc/lpc/hilfe.hilfe
index 217b1d9116aab331111c1061f8703678fd5d780a..d6004024760ab9e06193ce4aa0bb90b16ed55adb 100755
--- a/doc/lpc/hilfe.hilfe
+++ b/doc/lpc/hilfe.hilfe
@@ -4,7 +4,7 @@ NAME
 SYNTAX
 	$ hilfe
 	or
-	$ driver -Cstay hilfe
+	$ ulpc -Cstay hilfe
 
 DESCRIPTION
 	Hilfe is a LPC-script that supplies an incremental environment for
diff --git a/doc/lpc/preprocessor b/doc/lpc/preprocessor
new file mode 100644
index 0000000000000000000000000000000000000000..4a3bd37c59c44ff0c1ed92c01bf1e8f267533e11
--- /dev/null
+++ b/doc/lpc/preprocessor
@@ -0,0 +1,160 @@
+DESCRIPTION
+	µLPC has a builtin C-style preprocessor. It works similar to old
+	C preprocessors but has a few extra features. This file describes
+	the different preprocessor directives.
+
+PREPROCESSOR DIRECTIVES
+	#!
+	#define
+	#elif
+	#else
+	#elseif
+	#endif
+	#error
+	#if
+	#ifdef
+	#ifndef
+	#include
+	#line
+	#pragma
+	#undef
+
+----------------------------------------------------------------------------
+DIRECTIVE
+	#!
+
+DESCRIPTION
+	This directive is in effect a comment statement, since the
+	preprocessor will ignore everything to the end of the line.
+	This is used to write unix type scripts in µLPC by starting
+	the script with
+
+	#!/usr/local/bin/ulpc
+----------------------------------------------------------------------------
+DIRECTIVE
+	#define
+
+DESCRIPTION
+	The simplest way to use define is to write
+	
+		#define <identifier> <replacement string>
+
+	which will cause all subsequent occurances of 'identifier' to be
+	replaced with the replacement string.
+
+	Define also has the capability to use arguments, thus a line like
+
+		#define <identifier>(arg1, arg2) <replacement string>
+
+	would cause identifer to be a macro. All occurances of
+	'identifier(something1,something2d)' would be replaced with
+	the replacement string. And in the replacement string, arg1 and arg2
+	will be replaced with something1 and something2.
+----------------------------------------------------------------------------
+DIRECTIVE
+	#undef
+
+DESCRIPTION
+	This removes the effect of a #define, all subsequent occurances of
+	the undefined identifier will not be replaced by anything. Note that
+	when undefining a macro, you just give the identifer, not the
+	arguments.
+
+EXAMPLES
+	#define foo bar
+	#undef foo
+	#define foo(bar) gazonk bar
+	#undef foo
+----------------------------------------------------------------------------
+DIRECTIVE
+	#if
+	#elif
+	#elseif
+	#else
+	#endif
+
+DESCRIPTION
+	The #if directive causes conditional compiling of code depending on
+	the expression after the #if directive. That is, if the expression
+	is true, the code up to the next #else, #elif, #elseif or #endif is
+	compiled. If the expression is false, that code will be skipped.
+	If the skip leads up to a #else, the code after the else will be
+	compiled. #elif and #elseif are equivialent and causes the code that
+	follow them to be compiled if the previous #if or #elif evaluated
+	false and the expression after the #elif evaluates true.
+
+	Expressions given to #if, #elif or #endif are special, all identifiers
+	evaluate to zero unless they are defined to something else. Integers,
+	strings and floats are the only types that can be used, but all lpc
+	operators can be used on these types.
+
+	Also, two special functions can be used, defined() and efun().
+	defined(<identifer>) expands to '1' if the identifier is defined,
+	'0' otherwise. efun(<identifier>) expands to '1' if identifer is
+	an efun, '0' otherwise.
+
+EXAMPLES
+	#if 1
+	  write("foo");
+	#else
+	  write("bar");
+	#endif
+
+	#if defined(FOO)
+	  write(FOO);
+	#elif defined(BAR)
+	  write(BAR);
+	#else
+	  write("default");
+	#endif
+
+	#if !efun(write_file)
+	inherit "simulate.lpc"
+	#endif
+----------------------------------------------------------------------------
+DIRECTIVE
+	#error
+
+DESCRIPTION
+	This directive causes a compiler error, it can be used to notify
+	the user that certain efuns are missing and similar things.
+
+EXAMPLES
+	#if !efun(write_file)
+	#error Move object is missing
+	#endif
+----------------------------------------------------------------------------
+DIRECTIVE
+	#include
+
+DESCRIPTION
+	This directive should be given a file as argument, it will then be
+	compiled as if all those lines were written at the #include line.
+	The compiler then continues to compile this file.
+
+EXAMPLES
+	#include "foo.h"
+----------------------------------------------------------------------------
+DIRECTIVE
+	#line
+
+DESCRIPTION
+	This directive tells the compiler what line and file we are compiling.
+	This is for instance used by the #include directive to tell the
+	compiler that we are compiling another file. The directive takes
+	the line number first, and optionally, the file afterwards.
+
+	This can also be used when generating lpc from something else, to
+	tell teh compiler where the code originally originated from.
+
+EXAMPLES
+	#line 4 "foo.cf" /* The next line was generated from 4 in foo.cf */
+----------------------------------------------------------------------------
+DIRECTIVE
+	#pragma
+
+DESCRIPTION
+	This is a generic directive for flags to the compiler. Currently, the
+	only flag available is 'all_inline' which is the same as adding the
+	modifier 'inline' to all functions that follows.
+----------------------------------------------------------------------------
diff --git a/doc/lpc/reserved b/doc/lpc/reserved
new file mode 100644
index 0000000000000000000000000000000000000000..bb53824df56e0b39f4614df0a75333f25dbec724
--- /dev/null
+++ b/doc/lpc/reserved
@@ -0,0 +1,5 @@
+RESERVED WORDS
+   array break case catch continue default do efun else float for foreach
+   function gauge if inherit inline int lambda list mapping mixed nomask
+   object private program protected public return sscanf static string
+   switch varargs void while
diff --git a/doc/regexp/regexp b/doc/regexp/regexp
index 9da5b038f213247173f599bf92fb53a8756596a2..a9c0faf9412ac241a4bababa2edcc5dcd4effe8d 100644
--- a/doc/regexp/regexp
+++ b/doc/regexp/regexp
@@ -4,8 +4,28 @@ NAME
 DESCRIPTION
 	/precompiled/regexp is a precompiled LPC program that interfaces a
 	regexp package written in C. It contains a few simple functions to
-	handle regexps. For more documentation about regexps, consult your
-	unix manual for 'ed' or 'sed'.
+	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.
+
+	Note that \ can be used to quote these characters in which case
+	they match themselves, nothing else. Also note that when quoting
+	these something in uLPC you need two \ because uLPC also uses
+	this character for quoting.
+
+	For more information about regexps, refer to your unix manuals such
+	as sed or ed.
 
 	Descriptions of all functions in /precompiled/file follows:
 
@@ -56,13 +76,14 @@ SYNTAX
 
 DESCRIPTION
 	Works as regexp->match, but returns an array of the strings that
-	matched the subregexps.
+	matched the subregexps. Subregexps are those contained in < > in
+	the regexp. Subregexps that were not matched will contain zero.
+	If the total regexp didn't match, zero is returned.
+
+BUGS
+	You can only have 40 subregexps.
 
 SEE ALSO
 	regexp->create, regexp->split
 
 ============================================================================
-
-
-
-
diff --git a/doc/types/int b/doc/types/int
index 8a7e152881b24146f500e8a34eeb4ae3e6327805..b4fa8802006134ab230ade4acc0f9ed35f06b3c4 100644
--- a/doc/types/int
+++ b/doc/types/int
@@ -4,6 +4,7 @@ NAME
 SYNTAX EXAMPLE
 	9797 /* decimal number */
 	0x20 /* hexadecimal number */
+	020  /* octal number */
 
 DESCRIPTION
 	This type stores an integer, normally it is 32 bits and use 4 bytes