clean up ids/classes and generalizing functions