Declare a gender type
Use error_m monad and get rid of most exception throwing/catching