Cleanup and commenting, identified a bug, TODO specified