Added block comments and some fixes