code separtion, canvas and selection classes added