Date fields handling, handling php notices for forms, code cleanup, comments, special handling for contact is_deleted

Date fields handling, handling php notices for forms, code cleanup, comments, special handling for contact is_deleted