Cleaned up ndar_act_run, added doc strings, fixed bugs