Simplified main function