Renamed main and added -o support.