Cleaned up code per Hound's request.