Moved publice network creation within controller scope