Add more functions that were missing + tests

Warning: Tests fail!