code cleanup. fixed a few bugs
separate notifications and errors. Fixes #8