Started work on alert implementation

All alert functions except for displaying them too the user is going to live in lib.alerts too stop circular imports.

Some code for subscriptions may need tweaking as these are a big part of alerts.

This is still open too change. I am pushing to keep it safe, mainly from me :)