finished frontend part  structuring fixes #1