Removed common code and put it into a Common project