change chunkparser to always split each line to its own element
improved logic for adding defines. now will change an existing define instead of adding it again