Refactored the main player process so it uses a runPlayerProcess() function to start everything.