Updated readme and added main function