cleaned code, updated for both banner and canvas