coding conventions

added code style settings and made several changes to comply with
coding conventions