fixed some issues and added todos