refactor: Wrap useReducer and action creators in custom hook
After advice from runeh my first impression is that this has cleaned up the code again. The only un-necessary verbosity being type definitions, but I'm not willing to sacrifice type safety.
Closes #15