Clean up spec code