Refactoring, tests
Fix ALPHA-CHAR-P for uppercase chars