js rework and html simplification