Finished tests for expand
Tests and fixes for firstordefault
Removed debug
Added last and lastordefault