Changed some tests and main script