added TODOs
lots of cleanup and bug fixing