added autoscroll and some minor changes