cleaned up some code
drag and drop works correctly