Cleanup: Get rid of global variables

Part of #60.
Cleanup: Create project list once

This is more efficient and also will ease further refactoring.