Add more tests for core functions