Debugged, seems to be working now but have not done extensive unit tests