updated: code style, some fixes