update readme and cleanup code