Fix date problem. Removed some unnecessary stuff