fixed code to work with bridge
moved some functions around and tried not to butcher interfaces
fixed up modem checking code