Added cleanup and fixed where configura was called form