added customizable footer and more code cleaning