make init and exit functions static, compile with debug flags