Code clean up + comments.