Minor efficiency and variable changes.