Polished up gitlog function