Added some tests, Rearranges some imports