Porting of modules

This is quite ugly, why not having ``getFAQ()`` to take a ``Some(id)``?
Or even:
```case None:
     error_msg = "unknown_category";
     return false;```
directly?
This way you don't have to check for ``faq == null``.
Try as much as possible to avoid using checks of nulls and especially the use of magic values like -1 (while keeping your code error safe).