UI addition plus some JS functions