added 'delete' function back, hopefully another utf-8 bugfix (stupid
macs!) and cleaned up tests to be standard unittest compatible. also
other cleanups and bugfixes.