Reorganized some std code