Fix canvas rendering bugs, fix input handling, add sprite tinting, enhance texture management