Some code cleaning
Add support for detecting bar type and installing files not called *.bar