Fix potential bug. Change interface.
Reindent.
Fix bug. Fix #5.