Added wtml functionality and tests