Moved sphere code to general