added scan length slider & minor changes