Add tests for metatags, page function
Make code nicer