Refactor to put some properties private and documentation.