Fixed bugs. Working except for notifications.