Linted some and improved formatting/scope