Eluna/FreeBSD branch

Should properly implement everything specified.