When the port opens/closes

Changed when the port opens and closes.
Also changed the return dictionary types when the serial gives a
response.