Reorganized a bit after code review with Haiko