Bugfixes
First Version, which writes results back