Corrected upcase.
Removed unused code.