edit style v2

cleanup and more generic implementation