Code style and small cleanup