Added compiler unit-tests and a small fix to a compiler bug that created ineffecient templates.