formatting and shorter syntax for improved readability

I saw few syntactic mistakes in your codebase and decided to try and propose a better syntax/fix formatting. No functionality changed, all 144 test passed.