modify alert class internals
modify heartbeat class internals and fix some alert class internals
modify alert server to use new alert and heartbeat classes