Additional code changes based on internal feedback and slight formatting changes