Start of rewrite.
Bugfixes and readme update.
Remove old source file.