Added main code to repository.