Added -g for debugging
Fixed lookup & uppercase chars past first one
Uppercase characters if past first
Fix handling of prefix
Fixed terminal setings not to generate signals