Code style tweak.
Moving majority of the code into lib folder.
Ignoring *.log.