More documentation, re-arranged the class a little (no functional changes)