Finished separating logic and rendering