- Adapted to fbsd, changed some typos, added compile options