Added #ifndef ... trinity, code cleanup.