Upgraded to generics and fixed old threading bug with SimpleDateFormat