Added initial setting of subscription buttons to entity pages. Also cleaned up js