Fix cycle dispose. Move extend unit tests to extend-test