Clean-up and small improvements