Updated version with improved connection class - Also updated the build system to fix various warnings and errors