Moved tests to separated functions.
Added possibility of multiple tests.