various improvements, esp. at start and end