~okeanos: Run context script asynchronously

Also do some refactoring