Enhanced logging by 133,7%, plus code cleanup