chore: moves menu setup and hooks to lib/

Fixes #4