Double clicked node fix and code organization