Rearranging and improving tests