Cleaned up code, fixed to make it truly check only for alphanumeric