Module structure clean up + fixing module return value