Cleanup to make the code work also in real-life