So the next stage is to loose the dependency on the xterm window in our .xinitrc file AND to be able to launch new program processes (without blocking the wm).
I have added keyboard event detection and used popen to launch dmenu, which will allow me to start new programs without a UI (for the time being).
Now I almost have a usable wm to start developing against. All I need now is a layout algorithm to prevent the windows overlapping (remember this is a tiling window manager not a stacked one).