code and design small improvements