Factored out the procedure-checking and notes-altering logic
Used factored methods instead of inline logic