Removed some unneccesary code and added draggable option