re-organizing some of the files and functions.