Little refactoring, and adds ms to the date in console