Tried to shorten the code some by creating functions to add different objects to the page. They don't apply to every situation, but I think they will be useful in future projects.