added more test and did some clean up of src