Replace hardcoded error codes with constant class
capitalize(String) added