Moving methods around and added documentation.