add javascript ucfirst to frontend + better ucfirst in backend

http://jsperf.com/substr-or-charat