Drilling into functions

* Adding smaller functions that higher level functions need
* Adding print statements in functions