Sort of got auto-expansion to work