Added some basic functional tests