Fixed memory leaks, added isRegistered and registerInterface to NetworkInterface.