Split modules into files, retested with more complex cases.