Error fix retrieving speeds

/ minor code layout correction
/ other minor fixes