Simplified main() a little more