Minor tweaks

Fixing some minor formatting issues as well as efficiency improvements