added empty lines, some code style changes