did some debugging and found potential problem code and marked areas with TODOs. Will fix tomorrow. Its movie time.