Main function with some tests