scp.cpp reformatted, all methods added