Cleaned up Solution