Main process startup code