Huge refactor
Fixed support for matrix projects