Some refactoring and number of grades are now adjustable.