Move the tests inline

Refactoring the test to allow for a smaller diff later when we change the user tags.

This change just moves the tests and the variables to be in the test function.