Added test file. Cleaned main.