removed legacy code - updated comments.