Added support for do while loops and fixed some bugs when dealing with non-commascript code