added tests for project generator. Fix some cases, code improvements