Improved MyConnection, added documentation and a isIdInUse method.