better synthesis code cleanup