Cleaned up some duplication