Refactored sp_triu, added sp_tril, #554