Moved lanterna functions into an adapter.