Added determinant support. Also changed "id" to "instancetype" in some cases.