Move more canvas setup code into #setupCanvas