Refactoring for action controller

attempt #2 to authenticate with github for the 600th time