Continue refactor. Looking into ways to handle action functions