Changed functions and stored procedures to be before views to prevent errors when building on clean database.
Changed functions and stored procedures to be before views to prevent errors when building on clean database.

tbdye/css475