Final touches and code formatting