Replace `run-component.bash` script with a generic one
Minor refactorings