added more debugging/comments to reverse test
(hopefully) fixed some things that were broken with the reverse
fixed more bugs with reverse. these were fixing stuff that broke with optimizations and thinking about bits in the wrong direction