Improvements to the startup script (second try)