Cleaned it up a little. Added error detection for unmatched loops ([/])