Added initial logic to descriminate among type of projects. Fixed variou...

...s bits.