Clean up of code + removal of TODO