Bug Fix, Comments

Fixed Swapping id bug, added function descriptions