Added new tests and updated build
Not working currently, adding free function