Add main code and update readme