rearranged testApp to make more readable; put functions in more sensible order; moved monster code to its own function