Refactored native canvas class