Refactored test structure

Moved tests closer to what they test