Fix mistake in Shellra bonus

Also cleaned up the code per maxtherabbit's suggestions