persistence workign
fixed persistence manager and other minor changes