Refactored using kinetic.js
merged