State is now an enum. Fixes #16

Signed-off-by: marcanpilami <marsu_pilami@msn.com>