Separate loggers for each module. Make logger initialization consistent. Beautify main module.

Fix #29.