Added comments and removed some todos