Added a timeout for the remote script load and reorganised so that it loads an external bootstrap for flexibility