Update geometry code, add new operations and tests