Clean footer up and optimize some code