Added a simple control of data integrity. Fixed a bug where new courses couldn't be added manually. Added more general formulas in the summary page.