fixed configuration, moved flattenConfiguration function to compilerPass
added test