transpose(), various test adjustments

Test adjustments:
- made first_array & first_layout globals
- renamed some of my variables so they made more sense