Formatted code

and minigun tweaks