Cleaned up code, added early stopping for accepted strings