Preparing Canvas Code