Several changes to code style