* debug handling
* logging
* turn function return codes into error() codes
* the rest!
