Added new tests and rearranged some others