Adding functions with two input arrays only.
Splitting code in more files.