Cleaning up some rendering logic code. Native platforms still not working.