Rewrote some rendering code stuff