Added notifications and fixed some bugs