use enum direction instead of signed int
use true/false instead of TRUE/FALSE
using boost::optional<> instead of bool + parameter out