OO-ed a little and commented.
resolving