Remove redundant casting, consolidate setter macro