beginning of main plugin action code
initial work on table construction
cleanup whitespace