refectored pipes
fixed issue with notify firing multiple times and set tests to be async
removed unused state and useless update
made set state asyncronous