Issue #117: Refactored getVar()! Also some prettyprint and checkEOL().