Moved prefix into each query
Added functions for constraints checking
Completed normalize function