Add variable substitution
Clean up code and add tests

Move helper functions into clj-frontend-utils ns.

Fix several problems in variable substitution.

Add tests.