Bugfix for empty word string case, refactored adder.py