Fixed some date code, changed a class checking bit of code.