nsdate refactoring
fixed build options for device