Added git status and log and refactor a bit