Add find clumps function
Some cleanup
Ok, ok, this is maybe the one time just resetting the variable makes
things clearer
Add write-result function to make submissions easier