TYPOC-65: Simplify javascript