Don't update linecounter on non-linennumbered commands.
Removed unused code.
Preprocessor modifications for cura: read from stream.