Fixed note queries
Added cors