changed logic of NewDay2(). Some other small fixes