Major restructuring

Created a new .actions namespace that separates determining what can
be done from doing it. This makes the code easier to work with, and
should make status a much cleaner task to implement.