reorg code, remove generated files.