Moved unit tests into a separate file