Code Update

Updated the code to work as requested.  Comments still needed.