Fix indenting. Fix bug in top()