add end for def block
remove unnecessary autogen dir