small improvements to main