refactored application js to have more isolated function that can be stubbed more easily
stubbing the data from server to test what is being shown and hidden on the dom