Added main() for testing.
Added file removal.