updates #3: Code clean. Small improvements.