Replace ASCII checking chars and space with library methods