More robust checking
Adding tests. More in the making