Some cleanups and hopefully fix the brokeness with the layers