Refactored escaping
Added autoscroll tests
Fixed auto scroll