Added date parameter parsing; improved mapping algorithm