cleaned up code. started adding turbidostat functionality