Move clipboard functions and tests into their own modules