Move code out of the beats/ subdirectory.