Switched to blur on grade update, added minor debug

Aimed to fix problem with duplicate grade entries.
Created debug feature to verify grades are entered correctly
Added checking to prevent duplicate grade entries

Reduce duplicate grade entries.
Reformatted code
Minor change to formatting