update changelog
set version constant to 0.8.2
remove unused code
don't check whether begin/end is even, it's useless