Tiny optimization and cleanup in code style.
Tiny optimization to checking for divisibility by 11.
Added more unit tests. Fixed the bugs they uncovered.