Added socket alarm system.

Bug fix on the connection icon in the action bar. more work needs to be done.

DB changes and bug fix.

Code cleaning.