Refactored QNet.