Got most of main() set up. Moving onto the threaded functions.