Various code style improvements