Fixed another flattening problem
Clean-up warnings
Cleanup warnings