Update Module structure, code cleanup