merge code into fewer files for better demonstration.