click and drag and some comment general tidy ups in the code