Rewrite of the implementation to have a --serve flag.