Code 'credit points' section, fix minor bug of storing remaining units