Cleanup, better logging