simplified test file a bit
fixed bug and cleaned up tests a bit