Refactored code to improve performance.
Merge branch 'autorouter_port' of https://github.com/webgme/webgme