Changed canvas background to white. Moved size detection to onload.