Remove unneeded function
Added some tests