stroke/fillStyle doesn't matter until just before the call to stroke()/fill(), so you can move this down and make the flow a bit clearer.