clean up spec code