moving some knock init code to knock.c