Fixed return codes, updated TODO