Reordered code and added TODOs for next steps