ioslides: cleanup lua writer code