Finish home page logical code