General housekeeping.  Re-factored code to make it a little more readable / cleaner.