Fully fleshed out the python bits. All functionality exists, but is not tested.