Refactored to work on debians...