Initial check-in, single threaded code.