Changed code route to work with scratchpad. Fixed check button re-enabling after save when due date had passed. Code controller now fetches the correct repo, not just the first.