Re-factored code. Removed jQuery dependency and eraser tool