minor fixes along side with tests added