More Tests and fixes