searn beam learning kinda maybe working?
tentatively working version of beam learn, other various cleanups