Fix all current compilation errors
Remove redundant templates