Edited Address Problem

Made it a function, included more checks and the capacity for persistent
use within a program.