final debugging from video and new sources are added; unused lines of code now removed and comments are cleaned