Got rid of malloc, added references and required licensing