make prettier
fix formatting and some unintentional globals