tidied up and fixed most bugs with draggable