some minor clean ups
minor clean up
added some tests