Remove unused function
Code stylistic clean up in trap.c