Moved things around a bit.
Added JavaDoc