fixed spezialized matrix template, fixed smaller bugs and includes in CMakeLists