drag and drop

Adding module drag and drop. Some security and bug fixes.