Finished beta string subrutine of actionutil.f90