Use autogen generate module interface instead of write maunally.