Coding style, comments adjusted and removed unused variable.