Unused code removed. Loggin format improved.