Small cleanups, improved structure, reduce size