Some fixes and small improvements

- Removed global variables in some methods
- Removed redundant call of Ext.os.deviceType.toLowerCase
- Removed multiple instantiation of new Date in setValue