small formatting and efficiency changes