Reorganize model project and c# project

Fix code generation bug; design activity data structure.