Refactor to support new debian packaging