Add checks on geometry validity. Start tests.