Added safe and unsafe matrices; fixed Issue #25