Fixes type/list tests for new common_ancestor implementation
Fixes common_ancestor implementation
Creates types/ and functions/ folder and moves source accordingly