Renamed modes to tabs, added comments.