Tidied code, made use of SS New API