Cleaned up for better organization.