small improvements in existing code