Various bugfixes + more templates