Added dynamic canvas sizing