Selected nodes are now selectable displayed in selection pane
More refactoring. Removed duplucate html IDs, and removed nested addResult function.
Added loading gif and trim search input to prevent app crash.
Now use parameters in queries, so DB is less likely to crash from user input.