Minor bug fixing, comment cleanup