Re-organize code within controller and directive to have better separation of initial set up values and variables that are changed with user interaction.