Refactor log parsing

Some cleanup regarding the log parsing process
Merge pull request #8 from grilix/refactor_log

Refactor log parsing