refactor around ElementWrapper. validation is now twice as fast.