Moved tests into main module