adds dpkg support, various tweaks