Fixed various bugs, improved notification