Abstracted functionality out into files.