moved sql into xml files and updated managers