Throwing more code and lots of documentation at this problem.