initialize layout elements
remove unused variables