Added further improvements schema.sql to make it actually run and pushed create or replace stored proc to schema. Should help #115