Integrate getopt(), fix environment table import, remove KILL from startup routine.