changed method names and documented the methods
privatised recursive methods of key methods.