Add basic tests to polygon. Add comments