various fixes, posting notification rules now working properly, added hacky api test harness in tmp