Added scoping for multiple canvas support