Began working on unit tests for my api, i also cleaned up matrix creation api.