Finished up Unit tests and updated some functional tests