Add grade editing
Small refactorings