Small modifications on various functions and added a more optimised method than triu with memcpy for mcsne