Massive commit for compatibility with ubuntu. Sorry.