Still needs some work but the code is there.