Using logog in BaseLib and some code cleaning