OpenBSD + Fixes

OpenBSD support
Critical bugfixes and other minor changes