Refactor complex methods checkin and checkout (#666)

As per #666. **This pull request is not to be merged yet, as it is lacking test coverage.** Review solicited, since the operations on the methods' internal logic are over.
This will always return true since we add the notes header even if there are no missed procedures. We might want to add a test to make sure that the missed procedures are added to the notes.