Refactoring braille.py.