There's a lot of suggestions in the thread and I don't have time to implement them; and a bunch of them are conflicting too. Probably too late but here's the source code if you haven't realized its ...