histogram: simplify remove
histogram: TODO about reducing complexity on insert
remove garbage var
sort buffer if not flushed - fixes #5