Debian support and some cleanup