netmap fixes, improvements, and refactoring