refactor actions and dialog into their own modules

for easy re-factoring later on