Refactored alarms into separate functions, minor touchups, (disabled) tcpsocket page doing api presence check