Move S2 function declarations to S2.hpp