fixing code. minor cleanup.