Moved engine creation and session build to sample module