new hardfault handler, remove dead code