Major Simplification, Error handling, and date checking