Simple enhancements, added test suite

Added date formatting and parsing,
decomposition of engine (refactoring),
Added test suite and some tests
Simple UI changes