modified code syntax and defined basic functions to improve efficiency. Updated TODO list