cleanup and refactor slide drawing, option handling