Fix for issue 1418: a newline apparently made the median wrong.
Fixed issue 1347 (seemingly infinite loading)
Added @ealona's test cases.
Merge branch 'issue-1414-r2' of https://github.com/arkon94/Markus into arkon94-issue-1414-r2
Merge branch 'issue-1418' of https://github.com/arkon94/Markus into arkon94-issue-1418
Merge branch 'master' of https://github.com/MarkUsProject/Markus