Added some function documentation. Cleaned up the way SSH commands are created.