Cleaning code and ordering connection.h