Implemented init() and draw() functions