Fixed TODOs and exceptions