Added more todos and fixed some logic