Added slider and improved painting