Refactored log a bit
Add first test for log