make new subpackages under src/test/../headless

it was getting too confusing having all of it just mixed together
minor cleanup
remove commented-out code
split a test off into its own file
further splitting up of test/..../headless.lang