Function has_table changed to focus on actual tables
Functions rewritten to remove descriptions as parameters and functions added to check primary and index keys
duplicate functions removed
Tests for views added
simple script added to run all the tests