Correct issue #1

Support for multiple open projects and some code cleanup.