Some improvements on framework generator