Some cleanups and more boilerplate