Fixed poor structure in CheckHTTPS class