Cleaned up report building code