Updated readme and minor changes to main code.