Fix #14, Compact inHandler and outHandler into one