Moved statement processing to a separate method. Will add sub-processors.