Unified use of whitespace.
Replaced `expanding` boolean property with `state` enum property (closed, closing, expanding, expanded) to better distinguish between and handle states.