Added technical documentation. Also small bugfixes.