It probably does not matter, but I think it is better to move Python logic to its own file. It is nicer for the eyes.