Added some functional and unit testing