Improved is_installed() function

Implemented deb support and simplified variable names