Code formatting and code cleanup