Refactored insertion of dates. Added null check to getView in messages a...

...dapter.