Sorted out code
Added TODO list