Fixed error that was causing a test to fail.
Fixed error that was causing test to pass due to assert(True).
Simplified some conditions in the code.
Migrated strings to Python3 using unicode_literal.