Check if already installed

Before trying to install we check if the application is already
installed. Also format lists better.