Removed unused vars from earlier attempt.